from django.conf.urls import url
from django.urls import path

from apps.courses.views import CourseListView, CourseDetailView, CourseLessonView, CourseCommentsView, VideoView, \
    CourseVideoCommentsView, CourseDiscussDetail, CourseDiscussList, CourseHomeWork

# from apps.courses.views import VideoView


urlpatterns = [
    url(r'^list/$', CourseListView.as_view(), name="list"),
    url(r'^detail/(?P<course_id>\d+)/$', CourseDetailView.as_view(), name="detail"),
    url(r'^lesson/(?P<course_id>\d+)/$', CourseLessonView.as_view(), name="lesson"),
    url(r'^comments/(?P<course_id>\d+)/$', CourseCommentsView.as_view(), name="comments"),
    url(r'^(?P<course_id>\d+)/video/(?P<video_id>\d+)$', VideoView.as_view(), name="video"),
    url(r'^comments/video/(?P<course_id>\d+)/$', CourseVideoCommentsView.as_view(), name="video_comments"),
    #     讨论话题
    url(r'^discuss/(?P<course_id>\d+)/$', CourseDiscussList.as_view(), name="discuss"),
    #     讨论详情页
    url(r'^(?P<course_id>\d+)/discuss/(?P<discuss_id>\d+)$', CourseDiscussDetail.as_view(), name="discuss_detail"),
    #     课程作业展示
    url(r'^homework/(?P<course_id>\d+)/$', CourseHomeWork.as_view(), name="homework"),
]
